$step-icon-size: 43px;
$checkbox-size: 18px;
$radio-size: 24px;
$step-line-offset: 21px;
$checkbox-border-color: #918BA9;
$checkbox-checked-color: #8405FF;

%flexcol {
  display: flex;
  flex-direction: column;
}

%text-primary {
  color: var(--ks-content-primary);
}

%border-reset {
  border: 0;
  background-color: transparent;
}

.setup-container {
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  padding-top: 2rem;

  @media screen and (min-width: 992px) {
    gap: 3rem;
  }
}

.setup-sidebar {
  @extend %flexcol;
  gap: 2rem;
  padding: 0 1.5rem;
  border-radius: 12px;
  max-width: 30%;

  .logo-container {
    padding-bottom: 1rem;
    flex-shrink: 0;
  }

  @media (max-width: 992px) {
    gap: 1rem;
    padding: 1rem;
    max-width: 100%;
  }
}

.setup-main {
  @extend %flexcol;
  max-width: 60%;
  padding: 0 !important;

  @media (max-width: 992px) {
    max-width: 100%;
  }
}

.setup-card {
  width: 100%;
  padding: 1rem;
  overflow: hidden;

  &-body {
    @extend %flexcol;
    gap: 1rem;
  }
}

.card-header {
  position: relative;

  .skip-button {
    position: absolute;
    top: 0;
    right: 0;
    @extend %text-primary;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s;
    background-color: var(--ks-button-background-secondary);
    
    &:hover {
      background-color: var(--ks-button-background-secondary-hover);
    }
  }

  .header-title {
    @extend %text-primary;
    font-weight: 600;
    font-size: 24px;
    line-height: 36px;
  }
}

.password-requirements {
  margin-top: -8px;

  .el-text {
    color: var(--ks-content-tertiary);
    font-size: 14px;
  }
}

.el-step {
  :deep(.el-step__head > .el-step__icon) {
    width: $step-icon-size !important;
    height: $step-icon-size !important;
  }

  :deep(.el-step__line) {
    left: $step-line-offset;
  }

  
    
    :deep(.el-step__title) {
    vertical-align: middle;
    line-height: $step-icon-size;
    color: var(--ks-content-inactive);

    &.is-process {
      color: var(--ks-content-primary);
      font-weight: 400;
      font-size: 16px;
    }
  }

      &.is-vertical {
      gap: 2rem;
    }
}

.primary-icon :deep(.el-step__icon-inner) {
  color: var(--ks-content-primary);
}

.survey-radio-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;

  :deep(.el-radio) {
    margin: 0 !important;

    .el-radio__label {
      font-size: 14px;
      @extend %text-primary;
    }

    .el-radio__inner {
      width: $radio-size;
      height: $radio-size;
      border: 2px solid var(--ks-border-primary);
      @extend %border-reset;

      &::after {
        width: 12px;
        height: 12px;
        background-color: var(--ks-content-link);
      }
    }

    &.is-checked .el-radio__inner {
      border-color: var(--ks-content-link);
    }
  }
}

.use-case-checkboxes {
  margin-top: 10px;

  :deep(.el-checkbox-group) {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
  }

  .survey-checkbox {
    display: flex;
    align-items: center;
    @extend %border-reset;
    cursor: pointer;
    margin: 0;
  }
}

.newsletter-checkbox {
  margin-top: 1rem;
  display: flex;
  column-gap: 8px;
  align-items: center;

  :deep(.el-checkbox__label) {
    padding-left: 8px;
    text-wrap: wrap;
  }
}

%checkbox-shared {
  :deep(.el-checkbox__input) {
    margin-right: 8px;
    align-self: center;

    .el-checkbox__inner {
      border: 2px solid $checkbox-border-color;
      @extend %border-reset;
      width: $checkbox-size;
      height: $checkbox-size;
      position: relative;

      &::after {
        content: "";
        position: absolute;
        border: 2px solid white;
        border-top: 0;
        border-left: 0;
        width: 4px;
        height: 8px;
        transform: rotate(45deg);
        opacity: 0;
        top: 1px;
        left: 4px;
      }
    }

    &.is-checked .el-checkbox__inner {
      border-color: $checkbox-checked-color;
      background-color: $checkbox-checked-color;

      &::after {
        opacity: 1;
      }
    }
  }

  :deep(.el-checkbox__label) {
    font-size: 14px;
    padding-left: 0;
    line-height: 1.4;
    align-self: center;
    @extend %text-primary;
  }
}

.survey-checkbox,
.newsletter-checkbox {
  @extend %checkbox-shared;
}

.success-step {
  @extend %flexcol;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 0;

  .success-img {
    width: 65%;
    margin-top: -8rem;
    max-width: 400px;

    @media screen and (max-width: 992px) {
      width: 100%;
      margin-top: -6rem;
      margin-bottom: 1.5rem;
    }
  }

  .success-content {
    margin-top: -8rem;
    position: relative;
    padding: 2rem;

    @media screen and (max-width: 992px) {
      padding: 1rem;
    }
  }

  .success-title,
  .success-subtitle {
    @extend %text-primary;
    font-weight: 600;
    margin: 0;
  }

  .success-title {
    font-size: 24px;
    line-height: 36px;
  }

  .success-subtitle {
    font-size: 18.4px;
    line-height: 28px;
  }

  .success-button {
    margin-top: 1rem;
  }
}

:deep(.el-button:not(.skip-button)) {
  margin-top: 1rem;
}

:deep(.el-card__body) {
  @extend %flexcol;
  gap: calc(var(--spacer) / 2);
}

:deep(.el-form-item.is-error .el-input__wrapper) {
  box-shadow: 0 0 0 1px var(--ks-border-error) inset;
}

:deep(.el-form-item.is-error .el-input__suffix-inner),
:deep(.el-form-item__error) {
  color: var(--ks-content-alert) !important;
}

:deep(.el-input__inner) {
  font-size: 14px;

  &::placeholder {
    color: var(--ks-content-tertiary) !important;
  }
}

.el-row {
  .el-divider {
    flex: 1;
  }

  .el-col .el-card:deep(.el-card__header) {
    border-bottom: 0;
  }
}
